<template>
	<view class="footer u-flex-between">
		<view class="footer-left">
			<u-checkbox-group v-model="isAllSelect" placement="column" @change="$emit('change', $event)">
				<u-checkbox shape="circle" labelSize="24rpx" activeColor="#000000" :customStyle="{marginRight: ' 0px'}"
					label="全选" :name="1">
				</u-checkbox>
			</u-checkbox-group>
		</view>
		<view class="footer-right u-flex-between">
			<view class="total u-flex-end">
				<view class="label">合计：</view>
				<view class="money u-flex u-col-end">
					<view class="icon">￥</view>{{totalMoney}}
				</view>
			</view>
			<u-button text="去结算" shape="square" color="#000000" :customStyle="buttonCustomStyle"
				@click="$emit('submit')"></u-button>
		</view>
	</view>
</template>
<script>
	export default {
		name: "shop-cart-footer",
		data() {
			return {
				isAllSelect: [],
				buttonCustomStyle: {
					width: "220rpx",
					height: "80rpx",
					fontWeight: "bold",
				},
			};
		},
		// 此处定义传入的参数
		props: {
			totalMoney: {
				type: [Number, String],
				default: (() => {
					return 0;
				})
			}
		},
		mounted() {},
		methods: {
			initData(e = []) {
				this.isAllSelect = e;
			},
		}
	}
</script>
<style lang="scss" scoped>
	.footer {
		position: fixed;
		bottom: 70px;
		left: 0;
		z-index: 200;
		width: 100%;
		padding: 20rpx;
		box-sizing: border-box;
		background-color: #FFFFFF;
		box-shadow: 0rpx -2rpx 10rpx 2rpx rgba(0, 0, 0, 0.05);

		.footer-left {
			padding-left: 20rpx;
		}

		.total {
			padding-right: 20rpx;

			.label {
				font-size: 24rpx;
			}

			.money {
				font-size: 28rpx;
				font-weight: 800;
				color: $base-price-color;
				line-height: 1;

				.icon {
					line-height: 1;
					font-size: 20rpx;
				}
			}
		}
	}
</style>